import request from '@/config/axios'
/**
 * 查询物资类别
 */
export const listQueryCategory = (params) => {
  return request.get({ url: '/material/material-info/list-query-category', params })
}

/**
 * 新增物资类别
 */
export const createCategory = (data) => {
  return request.post({ url: '/material/material-info/create-category', data })
}

/**
 * 更新物资类别
 */
export const updateCategory = (data) => {
  return request.put({ url: '/material/material-info/update-category', data })
}

/**
 * 删除物资类别
 */
export const deletedCategory = (id) => {
  return request.delete({ url: '/material/material-info/deleted-category?id=' + id })
}

/**
 * 获取单个物资类别
 */
export const singleGetCategory = (id) => {
  return request.get({ url: '/material/material-info/single-get-category?id=' + id })
}

/**
 * 分页查询物资信息
 */
export const pageQuery = (params) => {
  return request.get({ url: '/material/material-info/page-query', params })
}

/**
 * 获取单个物资信息
 */
export const singleGet = (id) => {
  return request.get({ url: '/material/material-info/single-get?id=' + id })
}

/**
 * 新增物资信息
 */
export const create = (data) => {
  return request.post({ url: '/material/material-info/create', data })
}

/**
 * 更新物资信息
 */
export const update = (data) => {
  return request.put({ url: '/material/material-info/update', data })
}

/**
 * 删除物资信息
 */
export const deleted = (id) => {
  return request.delete({ url: '/material/material-info/deleted?id=' + id })
}
